home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Education / T-Z / TrigHype™ / card_5070.txt < prev    next >
Encoding:
Text File  |  1990-08-12  |  4.1 KB  |  210 lines

  1. -- card: 5070 from stack: in
  2. -- bmap block id: 5535
  3. -- flags: 4000
  4. -- background id: 4114
  5. -- name: c,a known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Side b
  11.   get card field "side a"
  12.   put it into mem1
  13.   get card field "side c"
  14.   put it into mem2
  15.   get sqrt(mem2^2-mem1^2)
  16.   put it into mem3
  17.   put it into card field "side b"
  18.  
  19.   --Calculate Tan A
  20.   get mem1/mem3
  21.   put it into mem4
  22.   put it into card field "tan A"
  23.  
  24.   --Calculate Sin A
  25.   get mem1/mem2
  26.   put it into mem5
  27.   put it into card field "sin A"
  28.  
  29.   --Calculate Cos B
  30.   get mem1/mem2
  31.   put it into mem6
  32.   put it into card field "cos B"
  33.  
  34.   --Calculate Angle A
  35.   get atan((card field "side a"/card field "side b"))*(180/pi)
  36.   put it into mem7
  37.   put it into card field "angle A"
  38.  
  39.   --Calculate Angle B
  40.   get bkgnd field "angle C"
  41.   put it into mem8
  42.   get mem8-mem7
  43.   put it into mem9
  44.   put it into card field "angle B"
  45.  
  46.   --Calculate Area
  47.   get card field "side a"*card field "side b"/2
  48.   put it into bkgnd field "Area"
  49.  
  50.   --Calculate Perimeter
  51.   get card field "side a"+card field "side b"+card field "side c"
  52.   put it into bkgnd field "Perimeter"
  53. end mouseUp
  54.  
  55.  
  56. -- part 1 (field)
  57. -- low flags: 00
  58. -- high flags: 0002
  59. -- rect: left=347 top=146 right=163 bottom=475
  60. -- title width / last selected line: 0
  61. -- icon id / first selected line: 0 / 0
  62. -- text alignment: 1
  63. -- font id: 3
  64. -- text size: 12
  65. -- style flags: 0
  66. -- line height: 16
  67. -- part name: side a
  68.  
  69.  
  70. -- part 2 (field)
  71. -- low flags: 01
  72. -- high flags: 0004
  73. -- rect: left=22 top=215 right=234 bottom=150
  74. -- title width / last selected line: 0
  75. -- icon id / first selected line: 0 / 0
  76. -- text alignment: 1
  77. -- font id: 3
  78. -- text size: 12
  79. -- style flags: 256
  80. -- line height: 16
  81. -- part name: angle A
  82.  
  83.  
  84. -- part 3 (field)
  85. -- low flags: 01
  86. -- high flags: 0004
  87. -- rect: left=245 top=85 right=104 bottom=373
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 0 / 0
  90. -- text alignment: 1
  91. -- font id: 3
  92. -- text size: 12
  93. -- style flags: 256
  94. -- line height: 16
  95. -- part name: angle B
  96.  
  97.  
  98. -- part 4 (field)
  99. -- low flags: 00
  100. -- high flags: 0002
  101. -- rect: left=51 top=137 right=154 bottom=184
  102. -- title width / last selected line: 0
  103. -- icon id / first selected line: 0 / 0
  104. -- text alignment: 1
  105. -- font id: 3
  106. -- text size: 12
  107. -- style flags: 0
  108. -- line height: 16
  109. -- part name: side c
  110.  
  111.  
  112. -- part 5 (field)
  113. -- low flags: 01
  114. -- high flags: 0004
  115. -- rect: left=112 top=263 right=282 bottom=240
  116. -- title width / last selected line: 0
  117. -- icon id / first selected line: 0 / 0
  118. -- text alignment: 1
  119. -- font id: 3
  120. -- text size: 12
  121. -- style flags: 256
  122. -- line height: 16
  123. -- part name: side b
  124.  
  125.  
  126. -- part 7 (field)
  127. -- low flags: 01
  128. -- high flags: 0001
  129. -- rect: left=387 top=208 right=220 bottom=447
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 0 / 0
  132. -- text alignment: 0
  133. -- font id: 3
  134. -- text size: 9
  135. -- style flags: 0
  136. -- line height: 12
  137. -- part name: tan A
  138.  
  139.  
  140. -- part 8 (field)
  141. -- low flags: 01
  142. -- high flags: 0001
  143. -- rect: left=387 top=224 right=236 bottom=447
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 0 / 0
  146. -- text alignment: 0
  147. -- font id: 3
  148. -- text size: 9
  149. -- style flags: 0
  150. -- line height: 12
  151. -- part name: sin A
  152.  
  153.  
  154. -- part 9 (field)
  155. -- low flags: 01
  156. -- high flags: 0001
  157. -- rect: left=387 top=240 right=252 bottom=447
  158. -- title width / last selected line: 0
  159. -- icon id / first selected line: 0 / 0
  160. -- text alignment: 0
  161. -- font id: 3
  162. -- text size: 9
  163. -- style flags: 0
  164. -- line height: 12
  165. -- part name: cos B
  166.  
  167.  
  168. -- part contents for card part 1
  169. ----- text -----
  170. 1
  171.  
  172. -- part contents for card part 4
  173. ----- text -----
  174. 1.414214
  175.  
  176. -- part contents for card part 5
  177. ----- text -----
  178. 1.000001
  179.  
  180. -- part contents for card part 7
  181. ----- text -----
  182. 0.999999
  183.  
  184. -- part contents for card part 8
  185. ----- text -----
  186. 0.707107
  187.  
  188. -- part contents for card part 9
  189. ----- text -----
  190. 0.707107
  191.  
  192. -- part contents for card part 2
  193. ----- text -----
  194. 44.999971
  195.  
  196. -- part contents for card part 3
  197. ----- text -----
  198. 45.000029
  199.  
  200. -- part contents for background part 3
  201. ----- text -----
  202. 90
  203.  
  204. -- part contents for background part 5
  205. ----- text -----
  206. 0.500000
  207.  
  208. -- part contents for background part 9
  209. ----- text -----
  210. 3.414215